import { getAction } from '@api/manage'

export default {
    data() {
        return {
            workingDataD9Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '功率值',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataD2Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '增益值',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataD3Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '本振偏移量',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataD4Columns: [
                {
                    title: '类型',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '状态',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center',
                    scopedSlots: { customRender: 'gain' },
                }
            ],

            workingDataQ9Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '功率值',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataQ2Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '增益值',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataQ3Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '本振偏移量',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataQ4Columns: [
                {
                    title: '类型',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '状态',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center',
                    scopedSlots: { customRender: 'gain' },
                }
            ],
            workingDataQ7Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '开关状态',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center',
                    scopedSlots: { customRender: 'gain' },
                }
            ],
            workingDataV2Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '增益值',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataV3Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '本振偏移量',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center'
                }
            ],
            workingDataV4Columns: [
                {
                    title: '类型',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '状态',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center',
                    scopedSlots: { customRender: 'gain' },
                }
            ],
            workingDataV7Columns: [
                {
                    title: '路数',
                    dataIndex: 'way',
                    key: 'way',
                    ellipsis: true,
                    align: 'center'
                },
                {
                    title: '开关状态',
                    dataIndex: 'gain',
                    key: 'gain',
                    ellipsis: true,
                    align: 'center',
                    scopedSlots: { customRender: 'gain' },
                }
            ],
            dictList1: [
                {
                    value: '00',
                    label: 'VCM模式',
                },
                {
                    value: '01',
                    label: 'ACM模式',
                }
            ],
            dictList2: [
                {
                    value: '00',
                    label: '同步',
                },
                {
                    value: '01',
                    label: '未同步',
                }
            ],
            dictList3: [
                {
                    value: '00',
                    label: '正常',
                },
                {
                    value: '01',
                    label: '异常',
                }
            ],
            dictList4: [
                {
                    value: '00',
                    label: '正常',
                },
                {
                    value: '01',
                    label: '过饱和',
                },
                {
                    value: '02',
                    label: '无',
                }
            ]
        }
    },
    methods: {
        // 16进制转10进制
        HexadecimalToString(str) {
            return str ? parseInt(str, 16) : ""
        },
        isMinus(str) {
            console.log(str, 'str-----', str[0] == 0)
            return str[0] == 0 ? false : true
            // console.log(str)
            // let a = parseInt(str, 16).toString(2).padStart(16, 0)
            // console.log(a, 'aaaaaaa')
            // if (a[0] == 1) {
            //     //是负数
            //     return true
            // } else {
            //     //是正数
            //     return false
            // }
            // return parseInt(str, 16).toString(2)
        },
        // 变频器状态转换
        frequencyConverter(str, val) {
            const arr = []
            if (str) {
                let b = parseInt(str, 16).toString(2).padStart(8, 0)

                let obj = {
                    id: 1,
                    way: '过输入告警',
                    gain: b[2] == 1 ? '告警' : b[2] == 0 ? '正常' : ''
                }
                let obj1 = {
                    id: 2,
                    way: '锁相环告警',
                    gain: b[3] == 1 ? '告警' : b[3] == 0 ? '正常' : ''
                }
                let obj2 = {
                    id: 3,
                    way: '过压告警',
                    gain: b[4] == 1 ? '告警' : b[4] == 0 ? '正常' : ''
                }
                let obj3 = {
                    id: 4,
                    way: '过流告警',
                    gain: b[5] == 1 ? '告警' : b[5] == 0 ? '正常' : ''
                }
                let obj4 = {
                    id: 5,
                    way: '过温告警',
                    gain: b[6] == 1 ? '告警' : b[6] == 0 ? '正常' : ''
                }
                if (val == 1) {
                    arr.push(obj)
                    arr.push(obj1)
                    arr.push(obj2)
                    arr.push(obj3)
                    arr.push(obj4)
                } else if (val == 2 || val == 3) {
                    arr.push(obj1)
                    arr.push(obj2)
                    arr.push(obj3)
                    arr.push(obj4)
                }
            }
            return arr
        },
        // 16进制转10进制按多少字节区分
        HexadecimalToStringSegmentation(str, val, lie) {
            const arr = []
            if (str) {
                let str1 = str.substring(0, val)
                let str2 = str.substring(val, val * 2)
                let str3 = str.substring(val * 2, val * 3)
                let obj = {
                    id: 1,
                    way: this.ASCIITonumStringAll(str1.substring(0, 2)),
                    gain: this.ASCIITonumStringAll(str1.substring(2, val))
                }
                arr.push(obj)
                if (lie != 1) {
                    let obj1 = {
                        id: 2,
                        way: this.ASCIITonumStringAll(str2.substring(0, 2)),
                        gain: this.ASCIITonumStringAll(str2.substring(2, val))
                    }
                    let obj2 = {
                        id: 3,
                        way: this.ASCIITonumStringAll(str3.substring(0, 2)),
                        gain: this.ASCIITonumStringAll(str3.substring(2, val))
                    }
                    arr.push(obj1)
                    arr.push(obj2)
                }

            }
            return arr
        },
        // 每一字节转10进制
        HexadecimalToStringAll(val) {
            if (val) {
                let arr = ''
                let k = 0
                for (let i = 0; i < val.length; i++) {
                    if (val.length > k) {
                        let ss = val.substring(k, k + 2)
                        if (arr) {
                            arr = arr + '.' + parseInt(ss, 16)
                        } else {
                            arr = arr + parseInt(ss, 16)
                        }
                        k += 2
                    }
                }
                return arr
            } else {
                return ''
            }

        },
        // 16进制ASCII码转10进制
        ASCIITonumStringAll(val) {
            if (val) {
                let arr = ''
                let k = 0
                for (let i = 0; i < val.length; i++) {
                    if (val.length > k) {
                        let ss = val.substring(k, k + 2)
                        if (arr) {
                            arr = arr + String.fromCharCode(parseInt(ss, 16))
                        } else {
                            arr = arr + String.fromCharCode(parseInt(ss, 16))
                        }
                        k += 2
                    }
                }
                return arr
            } else {
                return ''
            }

        },
        async getWorkingData() {
            const tempData = {
                deviceId: this.deviceData.deviceId,
                packageCode: '',
            }
            // 馈电基带
            if (this.sctiveType === 'feedBaseband') {
                tempData.packageCode = '016-全查询响应'
            }
            // V频段上变频器
            if (this.sctiveType === 'VBandUpconverter') {
                tempData.packageCode = '0305-V上变频器-全查询响应'
            }
            // Q频段下变频器
            if (this.sctiveType === 'QBandDownconverter') {
                tempData.packageCode = '0406-Q下变频器-全查询响应'
            }
            // 单通道下变频器
            if (this.sctiveType === 'singleChannelDownConverter') {
                tempData.packageCode = '0505-单通道-全查询响应'
            }
            // 开关矩阵
            if (this.sctiveType === 'switchMatrix') {
                tempData.packageCode = '0203-开关矩阵-全查询响应'
            }
            // 协议网关
            if (this.sctiveType === 'ProtocolGateway') {
                tempData.packageCode = '0103-协议网关-全查询响应'
            }
            // 测控基带
            if (this.sctiveType === 'MeasurementControlBaseband') {
                tempData.packageCode = '871-测控基带-状态查询响应'  //未配置齐全
                // tempData.packageCode = '0828-测控基带上报参数-全查询响应'  //未配置齐全
            }
            const { success, result, message } = await getAction(
                '/device/dmDevice/getLatestPackageGridValues',
                tempData
            )
            if (success) {
                // 馈电基带
                if (this.sctiveType === 'feedBaseband') {
                    result.forEach((item, index) => {
                        let a = item.packageGridValue || '' //对需要坐运算的值使用
                        if (item.gridCode === '016-全查询-设备序列号-参数体值') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'workingData1', item.packageGridValue)

                        }
                        if (item.gridCode === '016-全查询-电压-参数体值') {
                            let b = ''
                            if (a) {
                                b = Number(this.HexadecimalToString(a)) / 1000
                            }
                            this.form.workingData2 = b
                        }
                        if (item.gridCode === '016-全查询-下行自动调制编码-参数体值') {
                            const find = this.dictList1.find(x => x.value == item.packageGridValue)
                            this.form.workingData3 = find ? find.label : ''
                        }
                        if (item.gridCode === '016-全查询-下行接收功率-参数体值') {
                            let b = ''
                            if (a) {
                                let aa = 'FFFFDE40'
                                console.log()
                                // b = (Number(this.HexadecimalToString(a.substr(4, 4))) - 65536) / 1000
                                b = !this.isMinus(a) ? (Number(this.HexadecimalToString(a.substr(4, 4)))) / 1000 : (Number(this.HexadecimalToString(a.substr(4, 4))) - 65536) / 1000

                            }
                            this.form.workingData4 = b
                        }
                        if (item.gridCode === '016-全查询-下行信噪比-参数体值') {
                            let b = ''
                            if (a) {

                                b = !this.isMinus(a) ? (Number(this.HexadecimalToString(a.substr(4, 4)))) / 1000 : (Number(this.HexadecimalToString(a.substr(4, 4))) - 65536) / 1000
                            }
                            this.form.workingData5 = b
                        }
                        if (item.gridCode === '016-全查询-下行速率-参数体值') {
                            console.log(item.packageGridValue, 'item.packageGridValue')
                            this.form.workingData6 = this.HexadecimalToString(item.packageGridValue)
                        }
                        if (item.gridCode === '016-全查询-下行Eb/NO-参数体值') {
                            let b = ''
                            if (a) {
                                // b = (Number(this.HexadecimalToString(a.substr(4, 4))) - 65536) / 1000
                                b = !this.isMinus(a) ? (Number(this.HexadecimalToString(a.substr(4, 4)))) / 1000 : (Number(this.HexadecimalToString(a.substr(4, 4))) - 65536) / 1000
                            }

                            this.form.workingData7 = b
                        }
                        if (item.gridCode === '016-全查询-下行载波同步-参数体值') {
                            const find = this.dictList2.find(x => x.value == item.packageGridValue)
                            this.form.workingData8 = find ? find.label : ''
                        }
                        if (item.gridCode === '016-全查询-下行位同步-参数体值') {
                            const find = this.dictList2.find(x => x.value == item.packageGridValue)
                            this.form.workingData9 = find ? find.label : ''
                        }
                        if (item.gridCode === '016-全查询-下行帧同步-参数体值') {
                            const find = this.dictList2.find(x => x.value == item.packageGridValue)
                            this.form.workingData10 = find ? find.label : ''
                        }
                        if (item.gridCode === '016-全查询-下行链路同步-参数体值') {
                            const find = this.dictList3.find(x => x.value == item.packageGridValue)
                            this.form.workingData11 = find ? find.label : ''
                        }
                        if (item.gridCode === '016-全查询-上行发送帧计数-参数体值') {
                            this.form.workingData12 = this.HexadecimalToString(item.packageGridValue)
                        }
                        if (item.gridCode === '016-全查询-下行接收帧计数-参数体值') {
                            this.form.workingData13 = this.HexadecimalToString(item.packageGridValue)
                        }
                        if (item.gridCode === '016-全查询-接收协议网关帧计数-参数体值') {
                            this.form.workingData14 = this.HexadecimalToString(item.packageGridValue)
                        }
                        if (item.gridCode === '016-全查询-发射协议网关帧计数-参数体值') {
                            this.form.workingData15 = this.HexadecimalToString(item.packageGridValue)
                        }
                    })
                }
                // V频段上变频器
                if (this.sctiveType === 'VBandUpconverter') {
                    console.log(result, '这是VVVVVVVVV')
                    result.forEach((item, index) => {
                        if (item.gridCode === '0305-温度-参数值') {
                            this.$set(this.form, 'workingDataV1', this.ASCIITonumStringAll(item.packageGridValue))
                            // this.form.workingDataV1 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0305-增益-参数值') {
                            this.form.workingDataV2 = this.HexadecimalToStringSegmentation(item.packageGridValue, 12)
                        }
                        if (item.gridCode === '0305-本振偏移量-参数值') {
                            this.form.workingDataV3 = this.HexadecimalToStringSegmentation(item.packageGridValue, 14)
                        }
                        if (item.gridCode === '0305-上变频器状态-参数值') {
                            this.form.workingDataV4 = this.frequencyConverter(item.packageGridValue, 1)
                        }
                        if (item.gridCode === '0305-电压-参数值') {
                            this.form.workingDataV5 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0305-电流-参数值') {
                            this.form.workingDataV6 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0305-通路开关状态-参数值') {
                            this.form.workingDataV7 = this.HexadecimalToStringSegmentation(item.packageGridValue, 4)
                        }
                        if (item.gridCode === '0305-终端序列号-参数值') {
                            this.form.workingDataV8 = item.packageGridValue
                        }
                    })
                }
                // Q频段下变频器
                if (this.sctiveType === 'QBandDownconverter') {
                    result.forEach((item, index) => {
                        if (item.gridCode === '0406-温度-参数值') {
                            this.$set(this.form, 'workingDataQ1', this.ASCIITonumStringAll(item.packageGridValue))

                            // this.form.workingDataQ1 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0406-增益-参数值') {
                            this.form.workingDataQ2 = this.HexadecimalToStringSegmentation(item.packageGridValue, 12)
                        }
                        if (item.gridCode === '0406-本振偏移量-参数值') {
                            this.form.workingDataQ3 = this.HexadecimalToStringSegmentation(item.packageGridValue, 14)
                        }
                        if (item.gridCode === '0406-状态-参数值') {
                            this.form.workingDataQ4 = this.frequencyConverter(item.packageGridValue, 2)
                        }
                        if (item.gridCode === '0406-电压-参数值') {
                            this.form.workingDataQ5 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0406-电流-参数值') {
                            this.form.workingDataQ6 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0406-通路开关状态-参数值') {
                            this.form.workingDataQ7 = this.HexadecimalToStringSegmentation(item.packageGridValue, 4)
                        }
                        if (item.gridCode === '0406-输出功率-参数值') {
                            this.form.workingDataQ9 = this.HexadecimalToStringSegmentation(item.packageGridValue, 12)
                        }
                        if (item.gridCode === '0406-终端序列号-参数值') {
                            this.form.workingDataQ8 = item.packageGridValue
                        }
                    })

                }
                // 单通道下变频器
                if (this.sctiveType === 'singleChannelDownConverter') {

                    result.forEach((item, index) => {
                        if (item.gridCode === '0505-温度-参数值') {
                            this.form.workingDataD1 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0505-增益-参数值') {
                            this.form.workingDataD2 = this.HexadecimalToStringSegmentation(item.packageGridValue, 12, 1)
                        }
                        if (item.gridCode === '0505-本振偏移量-参数值') {
                            this.form.workingDataD3 = this.HexadecimalToStringSegmentation(item.packageGridValue, 14, 1)
                        }
                        if (item.gridCode === '0505-状态-参数值') {
                            this.form.workingDataD4 = this.frequencyConverter(item.packageGridValue, 3)
                        }
                        if (item.gridCode === '0505-电压-参数值') {
                            this.form.workingDataD5 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0505-电流-参数值') {
                            this.form.workingDataD6 = this.ASCIITonumStringAll(item.packageGridValue)
                        }
                        if (item.gridCode === '0505-输出功率-参数值') {
                            this.form.workingDataD9 = this.HexadecimalToStringSegmentation(item.packageGridValue, 12, 1)
                        }
                        if (item.gridCode === '0505-终端序列号-参数值') {
                            this.form.workingDataD8 = item.packageGridValue
                        }
                    })
                }
                // 开关矩阵
                if (this.sctiveType === 'switchMatrix') {
                    let objData = {}
                    result.forEach(item => {
                        objData[item.gridCode] = item.packageGridValue
                    })
                    const arr = []
                    for (let i = 1; i < 17; i++) {//输出通道
                        let obj = {
                            enter: i,
                            id: i
                        }

                        const find = this.dictList4.find(x => x.value == objData[`0203-通道${i}过饱和状态-参数值`])
                        obj.outputState = this.HexadecimalToString(objData[`0203-输出通道${i}状态-参数值`]) + 1
                        obj.power = this.ASCIITonumStringAll(objData[`0203-通道${i}功率监测-参数值`])
                        obj.saturateState = find ? find.label : ''
                        arr.push(obj)
                    }
                    this.data = arr
                }
                // 协议网关
                if (this.sctiveType === 'ProtocolGateway') {
                    let objData = {}
                    result.forEach(item => {
                        objData[item.gridCode] = item.packageGridValue
                    })
                    const arr = []
                    for (let i = 1; i < 9; i++) {//天线
                        for (let k = 1; k < 5; k++) { //通道
                            let obj = {
                                antenna: i,
                                passage: k,
                                modulationIp: '',
                                demodulationIp: '',
                                id: arr.length
                            }
                            obj.modulationIp = this.HexadecimalToStringAll(objData[`0103-协议网关-天线${i}通道${k}调制IP`])
                            obj.demodulationIp = this.HexadecimalToStringAll(objData[`0103-协议网关-天线${i}通道${k}解调IP`])
                            arr.push(obj)
                        }
                    }
                    this.data1 = arr
                }
                //测控基带全查询相应、、未配包
                if (this.sctiveType === 'MeasurementControlBaseband') {
                    result.forEach((item, index) => {
                        let a = item.packageGridValue || '' //对需要坐运算的值使用，829-测控基带-主备切换状态-参数值（这个协议里没找到）
                        if (item.gridCode === '829-测控基带-主备切换状态-参数值') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'MainBackupSwitching', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-监控方式') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'monitorMode', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-本机在线状态') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'LocalOnlineStatus', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-外时码状态') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'ExternalTimeCodeStatus', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-外频标状态') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'ExternalFrequencyStandard', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-基带送数方式') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'BasebandTransmissionMethod', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-接收中心指令包数') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'ReceiveCentralInstPacketsNum', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-遥控发令条数') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'RCcommandsNum', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-遥控小环误指令条数') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'RCsLoopErrorCommandNum', item.packageGridValue)
                        }
                        if (item.gridCode === '864-测控-公共-遥控小环环回中心条数') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'RCsLoopCentersNum', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-遥测载波锁定') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'TeleCarrierLocking', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-遥测伪码锁定') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'TelePseudocodeLocking', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-遥测AGC电压') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'TeleAGCVoltage', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-星锁指示') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'StarlockIndication', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-测量载波锁定指示') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'MeasurementCarrierLockIndication', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-测量伪码锁定指示') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'MeasurementPseudocodeLockIndication', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-测量AGC电压') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'MeasurementAGCVoltage', item.packageGridValue)
                        }
                        if (item.gridCode === '865-测控-中频接收单元-测量C/N0') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'MeasureCN0', item.packageGridValue)
                        }
                        if (item.gridCode === '867-测控-遥控单元-小环接收机锁定指示') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'sloopReceiverLockIndication', item.packageGridValue)
                        }
                        if (item.gridCode === '867-测控-遥控单元-小环比对结果') {
                            // this.form.workingData1 = item.packageGridValue
                            this.$set(this.form, 'ComparisonResultsOfsLoop', item.packageGridValue)
                        }
                    })
                }
                this.num++
            }

        }
    }
}

